package com.hdyg.sixg.activity.home;

import android.text.Html;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.hdyg.sixg.R;
import com.hdyg.sixg.activity.common.BaseActivity;
import com.hdyg.sixg.entry.ManageMoneyBean;
import com.hdyg.sixg.mvp.base.SpMsg;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import butterknife.BindView;


/**
 * @author CZB
 * @describe 理财规则
 * @time 2019/4/25 9:48
 */
public class ManageRuleActivity extends BaseActivity {

    @BindView(R.id.ll_top_left)
    LinearLayout llTopLeft;
    @BindView(R.id.tvTopTitle)
    TextView tvTopTitle;
    @BindView(R.id.tv_content)
    TextView tvContent;
    @BindView(R.id.srl_refresh)
    SmartRefreshLayout srlRefresh;

    private ManageMoneyBean.RuleBean ruleBean;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_notice_detail;
    }

    @Override
    protected void initView() {
        onClickListener();
        ruleBean = (ManageMoneyBean.RuleBean) getIntent().getSerializableExtra(SpMsg.INTENT_STR);
        if (ruleBean == null){
            return;
        }
        tvTopTitle.setText(ruleBean.getTitle());
        tvContent.setText(Html.fromHtml(ruleBean.getContent()));
    }

    private void onClickListener() {
        llTopLeft.setOnClickListener(v -> finish());
        srlRefresh.setOnRefreshListener(refreshLayout -> srlRefresh.finishRefresh(2000));
    }


    @Override
    protected void initData() {

    }

    @Override
    protected void createPresenter() {

    }

}
